package com.feeyo.groundservice.composewidget.util

import androidx.annotation.ColorRes
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.colorResource

/**
 *作者：QLH on 2023-08-01
 *描述： compose的工具类：颜色转换
 */

/**
 * 将colorRes值转换为 Color
 * @return Color 值
 */
@Stable
@Composable
fun @receiver:ColorRes Int.toComposeColor(): Color = colorResource(this)
